﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class TypeStatic : System.Web.UI.Page
{
    [RequestQuery.Query(QueryKey = "classtype")]
    public string ClassType = "AD";
    [RequestQuery.Query(QueryKey = "typeid")]
    public int TypeID = 0;

    protected void Page_Load(object sender, EventArgs e)
    {
        RequestQuery.SetQueryValues();

        if (TypeID != 0)
        {
            switch (ClassType.ToUpper())
            {
                case "AD":
                    DataEntity.Common.ExecuteNonQuery("update tab_Advertisement set adv_Clicks = adv_Clicks + 1 where adv_ID = @adv_ID", 
                        new string[] { "@adv_ID" },
                        new object[] { TypeID });
                    break;
            }
        }

        Response.Clear();
        Response.End();
    }
}
